﻿// =================================================================== 
// Module说明
//====================================================================
// 创建时间：2018-12-14 13:25:36
// 负责人：Sushee
// ===================================================================
using System;
using System.Data;
using System.Collections.Generic;
using System.Linq.Expressions;
using OF.Utility;
using OF.Component.Model;
using OF.Component.IDAL;
using OF.Component.Factory;
namespace OF.Component.BLL
{

    /// <summary>
    ///用户信息表 扩展
    /// </summary>
    public partial class UserOperate
    {
        /// <summary>
    	/// 根据断言条件获取单个用户信息表
    	/// </summary>
        public static UserInfo QuerySingle(Expression<Func<UserInfo, bool>> predicate)
        {
            return dal.QuerySingle(predicate);
        }

        /// <summary>
        /// 根据断言条件获获取用户信息表列表
        /// </summary>
        public static IList<UserInfo> QueryList(Expression<Func<UserInfo, bool>> predicate)
        {
            return dal.QueryList(predicate);
        }

        /// <summary>
        /// 根据手机获取用户信息
        /// </summary>
        /// <param name="mobile"></param>
        /// <returns></returns>
        public static UserInfo GetUserByMobile(string mobile)
        {
            return dal.GetUserByMobile(mobile);
        }

        /// <summary>
        /// 更新用户等级
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="level"></param>
        /// <returns></returns>
        public static int UpdateUserLevel(long userID, int level)
        {
            return dal.UpdateUserLevel(userID, level);
        }

        /// <summary>
        /// 更新用户头像
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="userName"></param>
        /// <param name="headImg"></param>
        /// <returns></returns>
        public static int UpdateUserHead(long userID,string userName,string headImg)
        {
            return dal.UpdateUserHead(userID, userName,headImg);
        }
    }
}